/*
 * Copyright (c) 2023, LXMS (lxinet.cn).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package cn.lxinet.lxms.system.entity;

import cn.lxinet.lxms.framework.mybatis.annotation.Id;
import cn.lxinet.lxms.framework.mybatis.annotation.Ignore;
import cn.lxinet.lxms.framework.mybatis.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 角色与菜单关联
 *
 * @author zcx
 * @date 2023/07/20
 */
@Data
@Schema(description = "角色与菜单关联")
@Table("sys_role_menu")
public class SysRoleMenu implements Serializable{
    @Ignore
    private static final long serialVersionUID = 1L;

    @Schema(description = "角色与菜单关联id")
    @Id
    private Long id;

    @Schema(description = "角色ID")
    private Long roleId;

    @Schema(description = "菜单ID")
    private Long menuId;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    public SysRoleMenu(){

    }

    public SysRoleMenu(Long roleId, Long menuId){
        this.roleId = roleId;
        this.menuId = menuId;
    }
}